#ifndef PLANO_H
#define PLANO_H

#include <QGLShaderProgram>
#include "Object3D.h"
#include <vector>
#include "OperatorEnum.h"

#define MAXARRAY 100

using namespace std;

class Plane : public Object3D
{
    Q_OBJECT

    GLint expressions[MAXARRAY];
    int exCount;
    GLfloat consts[MAXARRAY];
    int consCount;
    QGLShaderProgram program;

    GLfloat xRange;
    GLfloat yRange;


public:
    explicit Plane(int stacks, int slices);

    void setXRange(GLfloat v);
    void setYRange(GLfloat v);

    void setExpression(const vector<Operator>& ex, const vector<float>& con);

private:
    void init();
    virtual void drawGeometry(void);

};

#endif // PLANO_H
